#define QT_NO_DEBUG_OUTPUT

#include "widget.h"

#include <QApplication>
#include <QSharedMemory>
#include <QMessageBox>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    QSharedMemory memory("QQMusic");
    if(memory.attach())
    {
        QMessageBox::information(nullptr, "QQMusic", "当前QQMusic已在运行", QMessageBox::Ok);
        return 0;
    }

    memory.create(1);

    Widget w;
    w.show();
    //memory.detach();
    return a.exec();
}
